package com.runa.rccprotocol.dto.equdata;

import java.util.Date;

public class EventRecordData extends EquData {

    public enum ERC{
        CollectFail(1),
        MeterStatusChange(2),
        CatOnFail(11),
        CatSignalWeak(13),
        CatNetInFail(14),
        CatDialFail(15),
        CatLinkFail(16),
        CatLoginFail(17),
        HeatMeterFlowOutLimit(21);

        int code;

        ERC(int code) {
            this.code = code;
        }

        public static ERC valueOf(int code) {
            for (ERC erc : values()) {
                if (erc.code == code) return erc;
            }
            return null;
        }

    }

    private Date date;

    private boolean restore;

    private ERC erc;

    private int source;

    private Object content;

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public void setRestore(boolean restore) {
        this.restore = restore;
    }

    public boolean getRestore() {
        return restore;
    }

    public ERC getErc() {
        return erc;
    }

    public void setErc(ERC erc) {
        this.erc = erc;
    }

    public int getSource() {
        return source;
    }

    public void setSource(int source) {
        this.source = source;
    }

    public Object getContent() {
        return content;
    }

    public void setContent(Object content) {
        this.content = content;
    }
}
